package day3.LC343;

public class Main {
    public static void main(String[] args) {
        
    }
}


class Solution {
    public int integerBreak(int n) {
        int[] dp = new int[n+1];
        dp[2]=1;
        for (int i = 3; i <=n ; i++) {
            int temp=0;
            for (int j = 1; j <=i/2+1 ; j++) {
                temp=Math.max(j*(i-j),j*dp[i-j]);
                if (temp > dp[i]) {
                    dp[i]=temp;
                }
            }
        }
        return dp[n];
    }
}